package com.itsq.pojo.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.util.Date;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author 史先帅
 * @since 2021-01-30
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("personnel")
@ApiModel(value="Personnel对象", description="")
public class Personnel implements Serializable {

    private static final long serialVersionUID=1L;

    @ApiModelProperty(value = "人员信息表id")
      @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "用户名")
    @TableField("name")
    private String name;

    @ApiModelProperty(value = "身份证号")
    @TableField("user_id")
    private String userId;

    @ApiModelProperty(value = "身份证号")
    @TableField("sid")
    private String sid;

    @ApiModelProperty(value = "职位")
    @TableField("position")
    private String position;

    @ApiModelProperty(value = "手机号")
    @TableField("phone")
    private String phone;
    @TableField(exist = false)
    private String str1;
    @TableField(exist = false)
    private String str2;

    @ApiModelProperty(value = "单位id")
    @TableField("company_id")
    private Integer companyId;

    @ApiModelProperty(value = "科室id")
    @TableField("department_id")
    private Integer departmentId;

    @TableField(exist = false)
    private Company company;

    @TableField(exist = false)
    private Department department;

    @ApiModelProperty(value = "创建时间")
    @TableField(value = "cre_date",fill = FieldFill.INSERT)
    private Date creDate;

    @ApiModelProperty(value = "修改时间")
    @TableField(value = "upd_date",fill = FieldFill.UPDATE)
    private Date updDate;

    @ApiModelProperty(value = "状态")
    @TableField("state")
    @TableLogic
    private Integer state;


    @ApiModelProperty(value = "注册状态")
    @TableField(value = "is_ok")
    private Integer isOk;

    public static final String ID = "id";

    public static final String NAME = "name";

    public static final String USER_ID = "user_id";

    public static final String SID = "sid";

    public static final String POSITION = "position";

    public static final String PHONE = "phone";

    public static final String COMPANY_ID = "company_id";

    public static final String DEPARTMENT_ID = "department_id";

    public static final String CRE_DATE = "cre_date";

    public static final String UPD_DATE = "upd_date";

    public static final String STATE = "state";

    public static final String IS_OK = "is_ok";


}
